<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>RaspberryPiRGBLed</title>
</head>
<body>
<ul>
    <li>
        <button onclick="changeRGBColor('red')">Red</button>
    </li>
    <li>
        <button onclick="changeRGBColor('green')">Green</button>
    </li>
    <li>
        <button onclick="changeRGBColor('blue')">Blue</button>
    </li>
    <li>
        <button onclick="changeRGBColor('neon')">Neon</button>
    </li>
    <li>
        <button onclick="changeRGBColor('clear')">Clear</button>
    </li>

    <li>
        <button onclick="changeMixColor('purple')">purple</button>
    </li>
    <li>
        <button onclick="changeMixColor('white')">white</button>
    </li>
    <li>
        <button onclick="changeMixColor('greenTurkey')">greenTurkey</button>
    </li>
</ul>
</body>
<script>
    function changeRGBColor(state){
        console.log(state);
        var url = "/rgb/led?state="+state;
        fetch(url);
    }
    function changeMixColor(state){
        console.log(state);
        var url = "/rgb/mix?state="+state;
        fetch(url);
    }
</script>
</html>